<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/include/include.jsp"%>

<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="<c:url value="/role/list"/>" method="post">
	<input type="hidden" name="orderField" value="code" />
    <input type="hidden" name="orderDirection" value="asc"/>
	<div class="searchBar">		
		<table class="searchContent" style="width: 100%">
			<tr>
				<td width="50%">
					<youthburin:dwzSearchField label="page.role.rolecode" name="code" ops="eq"/>
				</td>
				<td width="50%">
					<youthburin:dwzSearchField label="page.role.rolename" name="name" ops="eq,cn"/>		
				</td>				
			</tr>		
		</table>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit"><fmt:message key="page.button.query"/></button></div></div></li>
			</ul>
		</div>
	</div>
	</form>
</div> 
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<shiro:hasPermission name="role:add">
				<li>
					<a class="add" href="<c:url value="/role/add"/>" title="<fmt:message key="page.role.addrole"/>" target="navTab">
						<span><fmt:message key="page.button.add"/></span>
					</a>
				</li>
				<li class="line">line</li>
			</shiro:hasPermission>
			<shiro:hasPermission name="role:delete">
				<li>
					<a class="delete" href="<c:url value="/role/delete"/>" target="selectedTodo" postType="string" title="<fmt:message key="page.role.deleterole"/>">
						<span><fmt:message key="page.button.delete"/></span>
					</a>
				</li>
				<li class="line">line</li>
			</shiro:hasPermission>
			<shiro:hasPermission name="role:edit">
				<li>
					<a class="edit" href="<c:url value="/"/>role/edit/{sid_role}" title="<fmt:message key="page.role.editrole"/>" target="navTab">
						<span><fmt:message key="page.button.edit"/></span>
					</a>
				</li>
				<li class="line">line</li>
			</shiro:hasPermission>
			<shiro:hasPermission name="role:view">
				<li>
					<a class="icon" href="<c:url value="/"/>role/view/{sid_role}" title="<fmt:message key="page.role.viewrole"/>" target="navTab">
						<span><fmt:message key="page.button.view"/></span>
					</a>
				</li>
				<li class="line">line</li>
			</shiro:hasPermission>
		</ul>
	</div>
	
	<table class="list" width="100%" layoutH="123">
		<thead>
			<tr>
				<th width="5%"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th width="20%"><fmt:message key="page.role.rolecode"/></th>
				<th width="20%"><fmt:message key="page.role.rolename"/></th>
				<th width="55%"><fmt:message key="page.role.remark"/></th>
			</tr>
		</thead>
		<tbody>
			<c:if test="${not empty page.list}">
				<c:forEach items="${page.list}" var="role">
					<tr target="sid_role" rel="${role.code}">
						<td><input name="ids" type="checkbox" value="${role.code}"></td>
						<td>${role.code }</td>
						<td>${role.name }</td>
						<td>${role.remark}</td>
					</tr>
				</c:forEach>
			</c:if>
		</tbody>
	</table>
	<youthburin:dwzPagination url="/role/list" orderField="code" orderDirection="asc" conditions="code,name" />
</div>
